<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // obj={
        //     "id":100000,
        //     "name":"jack",
        //     "age":19
        // }

        // let arr=[
        //     {
        //         "id":"10002003",
        //         "name":"茶珈酒局",
        //         "picture":""
        //     },
        //     {
        //         "id": "1007000",
        //         "name": "水具杯壶",
        //         "picture": ""
        //     },
        //     {
        //         "id": "1017000",
        //         "name": "宠物食品",
        //         "picture": ""
        //     },
        //     {
        //         "id": "109248004",
        //         "name": "宠物用品",
        //         "picture": ""
        //     }
        // ]


        // console.log(obj);
        // console.log(JSON.stringify(obj));
        // console.log(typeof JSON.stringify(obj));

        // let jsonStr='{"id":10001,"name":"mary","age":16}'
        // console.log(typeof jsonStr)
        // console.log(JSON.parse(jsonStr))
        // console.log(typeof JSON.parse(jsonStr))


        // localStorage.setItem("str1",obj)
        // localStorage.setItem("str2",jsonStr)

        // console.log(localStorage.getItem("str1"));
        // let str3=localStorage.getItem("str2")
        // console.log(JSON.parse(str3))



        obj={
            "id":10000,
            "name":"jack",
            "age":19
        }

        let arr=[
            {
                "id":"10002003",
                "name":"茶咖酒具",
                "picture":""
            },
            {
                "id": "1007000",
                "name": "水具杯壶",
                "picture": ""
            },
            {
                "id": "1017000",
                "name": "宠物食品",
                "picture": ""
            },
            {
                "id": "109248004",
                "name": "宠物用品",
                "picture": ""
            }
        ]


        console.log(obj)
        console.log(JSON.stringify(obj))
        console.log(typeof JSON.parse(jsonStr));

        
    </script>
</body>
</html>